<include file="Public:header"/>
<script src='{$Think.const.PUBLIC_PATH}/Plugin/process/js/radialIndicator.js'></script>
<script>
function ready(){



    function start(){
      function sendData(page=1,limit=10){
			if(page>countPage){
			  return false;
			}
			var  url="__MODULE__/AjaxScan/start/page/"+page+'/limit/'+limit;
			$.get(url,function(data,status){
			radialObj.value(page);
			page++;
			sendData(page);
			console.log(data);
			});
	  }
      var countPage={$countPage};
      $('div.table-responsive ').hide();
      var radialObj = $('#indicatorContainer').radialIndicator({
           minValue: 1,
           maxValue: countPage
      }).data('radialIndicator');
	sendData();
    }
	
 $('#ajaxScan').click(start);
}

$(document).ready(ready)

</script>
<div class="col-sm-12 widget-container-span">
	<div class="widget-box transparent">
		<div class="widget-body">
			<div class="widget-main padding-12 no-padding-left no-padding-right">
				<div class="tab-content padding-4">
					<div id="home1" class="tab-pane in active">
						<div class="row">
							<div class="col-xs-12 no-padding-right">
								<div class="table-responsive">
								<button id="ajaxScan">ajax多线程快速扫描(前端分页扫描，解决服务器端时间太长问题，缺点就是页面不能关闭)</button>
								<br>
							   <a target="_blank" href="__MODULE__/SingleScan/start">单线程扫描（高精确度，不过费时间，适合后台crontab）</a>
								<br>
							    <a target="_blank" href="__MODULE__/MultiScan/start">多线程快速扫描(速度快,不过网络不稳定下，数据会出现丢失，nginx下配置不好，会出现504)</a>
								<br>
							   <a target="_blank" href="__MODULE__/Keyword/clearMatch">清除所有数据，重新开始采集</a>
							  

							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
		<div class="prg-cont-wrap"><div class="prg-cont rad-prg" id="indicatorContainer"><canvas width="110" height="110"></canvas></div></div>

	</div>
</div>
